package com.ruoyi.business.service.impl;
 
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import com.ruoyi.business.domain.LpClassify;
import com.ruoyi.business.mapper.LpClassifyMapper;
import com.ruoyi.business.service.LpClassifyService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;
/**
 * @Author makejava
 * @Desc (LpClassify)表服务实现类
 * @Date 2024-05-14 10:28:24
 */
 
@Service
public class LpClassifyServiceImpl extends ServiceImpl<LpClassifyMapper,LpClassify> implements LpClassifyService {
 
    @Resource
    private LpClassifyMapper lpClassifyMapper;
 
 
    /**
     * 查询列表数据
     * @param lpClassify 实例对象
     * @return 对象列表
     */
    @Override
    public List<LpClassify> queryAll(LpClassify lpClassify) {
        List<LpClassify> dataList = lpClassifyMapper.queryAll(lpClassify);
        return dataList;
    }
 
    @Override
    public LpClassify queryById(Long classifyId) {
        return lpClassifyMapper.queryById(classifyId);
    }
 
 
    @Override
    public int insert(LpClassify lpClassify) {
        if (super.save(lpClassify) == true){
            return 1;
        }else{
            return 0;
        }

    }
 
 
    @Override
    public int update(LpClassify lpClassify) {
        return lpClassifyMapper.update(lpClassify);
    }
 
 
    @Override
    public int deleteById(Long classifyId) {
        return lpClassifyMapper.deleteById(classifyId);
    }
    
      /**
     * 通过id批量删除
     */  
    @Override
    public int batchRemove( Long[] classifyIds) {
        return lpClassifyMapper.batchRemove(classifyIds);
    }
    
}
